package main

import (
	"fmt"
	"go-shop-admin/conf"
	"go-shop-admin/internal/dao"
	"go-shop-admin/internal/route"
	"go-shop-admin/internal/validate"
	"go-shop-admin/pkg/zydhlog"
)

// 入口文件
func main() {
	fmt.Println("this is main.go")

	//加载配置
	//conf.Init() - old struct 模式
	conf.InitViper()

	//初始化mysql
	dao.InitMysql()

	//初始化日志
	zydhlog.InitZydhLog()

	//初始化验证器validator
	validate.InitTranslator("zh")

	//加载路由
	route.LoadRoute()
}
